
#include "HttpServer.hpp"
void Login(HttpRequest& req, HttpResponse& resp)
{
    // 根据req，动态构建resp
}
int main(int argc, char* argv[])
{
    if(argc!= 2)
    {
        std::cout << "Usage: " << argv[0] << " port" << std::endl;
        return 1;
    }
    auto httpserver = std::make_shared<HttpServer>(std::stoi(argv[1]));
    //To make the server have login functionality
    //要让服务器具有登录功能，我们需要在注册路由之前先注册登录函数
    httpserver->Register("/login", Login);
    httpserver->Start();
    return 0;
}